import { get, post,DELETE } from '@/utils/request'
const BASE_URL = window.baseUrl.icp

// 查询基线列表
export function queryPageList(query) {
  return get(BASE_URL + '/baselines', query)
}
// 查询基线分组列表
export function querygroupList(query) {
  return get(BASE_URL + '/baselines/model', query)
}
// 测试-获取基线详情
export function detailList(type, query) {
  return get(BASE_URL + '/baselines/' + type, query)
}
// 获取阈值类详情
export function numList(type, query) {
  return get(BASE_URL + '/baselines/' + type + '/thresholds/description', query)
}
// 获取时间范围类详情
export function timeList(type, query) {
  return get(BASE_URL + '/baselines/' + type + '/timeRanges/description', query)
}
// 获取白名单列表详情
export function whiteList(type, query) {
  return get(BASE_URL + '/baselines/' + type + '/whitelists/description', query)
}
// 修改基线状态
export function status(type, query) {
  return post(BASE_URL + '/baselines/' + type + '/status', query)
}
// 获取阈值类默认值
export function numDefault(type, query) {
  return get(BASE_URL + '/baselines/' + type + '/thresholds/default', query)
}
// 获取时间范围类基线默认值
export function timeRangesDefault(type, query) {
  return get(BASE_URL + `/baselines/${type}/timeRanges/default`, query)
}

// 获取白名单类基线默认值
export function whitelistsDefault(type, query) {
  return get(BASE_URL + `/baselines/${type}/whitelists/default`, query)
}

// 新增/修改阈值类基线默认值
export function addThresholdsDefault(type, query) {
  return post(BASE_URL + `/baselines/${type}/thresholds/default`, query)
}
// 新增/修改时间范围类基线默认值
export function addTimeRangesDefault(type, query) {
  return post(BASE_URL + `/baselines/${type}/timeRanges/default`, query)
}
//  新增/修改白名单类基线默认值   
export function addWhitelistsDefault(type, query) {
  return post(BASE_URL + `/baselines/${type}/whitelists/default`, query)
}
//  清除/删除阈值类基线默认值   
export function delThresholdsDefault(type, query) {
  return DELETE(BASE_URL + `/baselines/${type}/thresholds/default`,query)
}
// 清除/删除时间范围类基线默认值
export function delTimeRangesDefault(type, query) {
  return DELETE(BASE_URL + `/baselines/${type}/timeRanges/default`,query)

}
//  清除/删除白名单类基线默认值
export function delWhitelistsDefault(type, query) {
  return DELETE(BASE_URL + `/baselines/${type}/whitelists/default`,query)
}
// 提交学习配置    /baselines/{type}/settings
export function settings(type, query) {
  return post(BASE_URL + `/baselines/${type}/settings`, query)
}